home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_ctrl / cuactrls / ctextbox.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-22  |  9.0 KB  |  294 lines

  1. VERSION 2.00
  2. Begin Form frmTextBox 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Text Box Demo"
  6.    ClientHeight    =   4710
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   6600
  10.    ClipControls    =   0   'False
  11.    Height          =   5115
  12.    Icon            =   0
  13.    Left            =   1035
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   4710
  16.    ScaleWidth      =   6600
  17.    Top             =   1140
  18.    Width           =   6720
  19.    Begin CUAEdit txt7 
  20.       BorderStyle     =   3  'Inset
  21.       DataField       =   "KommPort"
  22.       DataSource      =   "Data1"
  23.       Height          =   300
  24.       Left            =   1830
  25.       TabIndex        =   13
  26.       Text            =   "Text 7"
  27.       Top             =   3540
  28.       Width           =   1500
  29.    End
  30.    Begin CUAEdit txt6 
  31.       BorderStyle     =   3  'Inset
  32.       DataField       =   "KOD"
  33.       DataSource      =   "Data1"
  34.       Height          =   300
  35.       Left            =   1830
  36.       TabIndex        =   15
  37.       Text            =   "Integer"
  38.       Top             =   3870
  39.       Width           =   1500
  40.    End
  41.    Begin CUAEdit txt5 
  42.       BorderStyle     =   3  'Inset
  43.       DataField       =   "BOOL"
  44.       DataSource      =   "Data1"
  45.       Height          =   300
  46.       Left            =   1830
  47.       TabIndex        =   11
  48.       Text            =   "Bool"
  49.       Top             =   3210
  50.       Width           =   1500
  51.    End
  52.    Begin CUAEdit txt4 
  53.       BorderStyle     =   3  'Inset
  54.       DataField       =   "PM"
  55.       DataSource      =   "Data1"
  56.       Height          =   300
  57.       Left            =   225
  58.       TabIndex        =   16
  59.       Text            =   "PM"
  60.       Top             =   4200
  61.       Width           =   1500
  62.    End
  63.    Begin Data Data1 
  64.       Caption         =   "CUACTLS.MDB"
  65.       Connect         =   ""
  66.       DatabaseName    =   "C:\BP\CUACTLS\CUACTLS.MDB"
  67.       Exclusive       =   0   'False
  68.       FontBold        =   0   'False
  69.       FontItalic      =   0   'False
  70.       FontName        =   "MS Sans Serif"
  71.       FontSize        =   8.25
  72.       FontStrikethru  =   0   'False
  73.       FontUnderline   =   0   'False
  74.       Height          =   270
  75.       Left            =   1845
  76.       Options         =   0
  77.       ReadOnly        =   0   'False
  78.       RecordSource    =   "Test"
  79.       Top             =   4215
  80.       Width           =   2430
  81.    End
  82.    Begin CUAEdit txt1 
  83.       BorderStyle     =   3  'Inset
  84.       DataField       =   "TEXT"
  85.       DataSource      =   "Data1"
  86.       Height          =   300
  87.       Index           =   5
  88.       Left            =   225
  89.       TabIndex        =   10
  90.       Text            =   "Text 30"
  91.       Top             =   3210
  92.       Width           =   1500
  93.    End
  94.    Begin CUAEdit txt2 
  95.       BorderStyle     =   3  'Inset
  96.       DataField       =   "TAL"
  97.       DataSource      =   "Data1"
  98.       Height          =   300
  99.       Left            =   225
  100.       TabIndex        =   12
  101.       Text            =   "Long"
  102.       Top             =   3540
  103.       Width           =   1500
  104.    End
  105.    Begin CUAEdit txt3 
  106.       BorderStyle     =   3  'Inset
  107.       DataField       =   "DATUM"
  108.       DataSource      =   "Data1"
  109.       Height          =   300
  110.       Left            =   225
  111.       TabIndex        =   14
  112.       Text            =   "Datum"
  113.       Top             =   3870
  114.       Width           =   1500
  115.    End
  116.    Begin CUAEdit txt1 
  117.       BorderStyle     =   3  'Inset
  118.       Height          =   300
  119.       Index           =   4
  120.       Left            =   240
  121.       TabIndex        =   8
  122.       Text            =   "Validerad"
  123.       Top             =   2505
  124.       Width           =   1215
  125.    End
  126.    Begin CUAEdit txt1 
  127.       BorderStyle     =   3  'Inset
  128.       Height          =   300
  129.       Index           =   3
  130.       Left            =   240
  131.       TabIndex        =   6
  132.       Text            =   "0"
  133.       Top             =   2160
  134.       Type            =   1  'Integer
  135.       Width           =   1215
  136.    End
  137.    Begin CUAEdit txt1 
  138.       BorderStyle     =   3  'Inset
  139.       Case            =   2  'Upper Case
  140.       Height          =   300
  141.       Index           =   2
  142.       Left            =   240
  143.       TabIndex        =   4
  144.       Text            =   "UPPERCASE"
  145.       Top             =   1800
  146.       Width           =   1215
  147.    End
  148.    Begin CUAEdit txt1 
  149.       BorderStyle     =   3  'Inset
  150.       Height          =   300
  151.       Index           =   1
  152.       Left            =   240
  153.       Mask            =   "### ##"
  154.       TabIndex        =   2
  155.       Text            =   "### ##"
  156.       Top             =   1455
  157.       Width           =   1215
  158.    End
  159.    Begin CUAEdit txt1 
  160.       Height          =   300
  161.       Index           =   0
  162.       Left            =   240
  163.       ReadOnly        =   -1  'True
  164.       TabIndex        =   0
  165.       Text            =   "ReadOnly"
  166.       Top             =   1110
  167.       Width           =   1215
  168.    End
  169.    Begin CUACommand cmdOK 
  170.       Cancel          =   -1  'True
  171.       Caption         =   "OK"
  172.       Default         =   -1  'True
  173.       Height          =   345
  174.       Left            =   5145
  175.       StandardButton  =   1  'OK
  176.       TabIndex        =   18
  177.       Top             =   60
  178.       Width           =   1260
  179.    End
  180.    Begin CUALabel lbl 
  181.       Caption         =   "Thes text boxes are all connected to a field in a data base. Maximum allowed length and data type are set automagically."
  182.       FontBold        =   0   'False
  183.       FontItalic      =   0   'False
  184.       FontName        =   "MS Sans Serif"
  185.       FontSize        =   8.25
  186.       FontStrikethru  =   0   'False
  187.       FontUnderline   =   0   'False
  188.       ForeColor       =   &H00000080&
  189.       Height          =   630
  190.       Index           =   5
  191.       Left            =   3420
  192.       TabIndex        =   17
  193.       Top             =   3315
  194.       Width           =   3030
  195.    End
  196.    Begin CUALabel lbl 
  197.       Caption         =   "Validated, must be between 1 and 1000."
  198.       FontBold        =   0   'False
  199.       FontItalic      =   0   'False
  200.       FontName        =   "MS Sans Serif"
  201.       FontSize        =   8.25
  202.       FontStrikethru  =   0   'False
  203.       FontUnderline   =   0   'False
  204.       Height          =   195
  205.       Index           =   4
  206.       Left            =   1680
  207.       TabIndex        =   9
  208.       Top             =   2550
  209.       Width           =   3360
  210.    End
  211.    Begin CUALabel lbl 
  212.       Caption         =   "Accepts only integers."
  213.       FontBold        =   0   'False
  214.       FontItalic      =   0   'False
  215.       FontName        =   "MS Sans Serif"
  216.       FontSize        =   8.25
  217.       FontStrikethru  =   0   'False
  218.       FontUnderline   =   0   'False
  219.       Height          =   195
  220.       Index           =   3
  221.       Left            =   1680
  222.       TabIndex        =   7
  223.       Top             =   2205
  224.       Width           =   1770
  225.    End
  226.    Begin CUALabel lbl 
  227.       Caption         =   "Uppercase, capitalizes all input."
  228.       FontBold        =   0   'False
  229.       FontItalic      =   0   'False
  230.       FontName        =   "MS Sans Serif"
  231.       FontSize        =   8.25
  232.       FontStrikethru  =   0   'False
  233.       FontUnderline   =   0   'False
  234.       Height          =   195
  235.       Index           =   2
  236.       Left            =   1680
  237.       TabIndex        =   5
  238.       Top             =   1860
  239.       Width           =   3720
  240.    End
  241.    Begin CUALabel lbl 
  242.       Caption         =   "Formatted entry of a Swedish ZIP code"
  243.       FontBold        =   0   'False
  244.       FontItalic      =   0   'False
  245.       FontName        =   "MS Sans Serif"
  246.       FontSize        =   8.25
  247.       FontStrikethru  =   0   'False
  248.       FontUnderline   =   0   'False
  249.       Height          =   195
  250.       Index           =   1
  251.       Left            =   1680
  252.       TabIndex        =   3
  253.       Top             =   1515
  254.       Width           =   3480
  255.    End
  256.    Begin CUALabel lbl 
  257.       Caption         =   "ReadOnly, but works with the clip board."
  258.       FontBold        =   0   'False
  259.       FontItalic      =   0   'False
  260.       FontName        =   "MS Sans Serif"
  261.       FontSize        =   8.25
  262.       FontStrikethru  =   0   'False
  263.       FontUnderline   =   0   'False
  264.       Height          =   195
  265.       Index           =   0
  266.       Left            =   1680
  267.       TabIndex        =   1
  268.       Top             =   1155
  269.       Width           =   4335
  270.    End
  271.    Begin Line Line1 
  272.       X1              =   300
  273.       X2              =   6135
  274.       Y1              =   3000
  275.       Y2              =   3000
  276.    End
  277. Option Explicit
  278. Sub cmdOK_Click ()
  279.    Unload Me
  280. End Sub
  281. Sub Data1_Error (DataErr As Integer, Response As Integer)
  282.    Response = 0
  283. End Sub
  284. Sub Form_Load ()
  285.    Data1.DatabaseName = DatabaseName
  286. End Sub
  287. Sub txt1_Validate (Index As Integer, Cancel As Integer)
  288.    Dim Number
  289.    If Index = 4 Then
  290.       Number = Val(txt1(4))
  291.       Cancel = (Number < 1 Or Number > 1000)
  292.    End If
  293. End Sub
  294.